package com.xqb.modules.domain.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xqb.common.annotation.Excel;
import com.xqb.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 兑换码对象 mkt_exchange_code
 * 
 * @author xqb
 * @date 2024-10-15
 */
public class MktExchangeCode extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 兑换码id */
    private Long id;

    /** 兑换码 */
    @Excel(name = "兑换码")
    private String code;

    /** 兑换码状态， 1：待兑换，2：已兑换，3：兑换活动已结束 */
    @Excel(name = "兑换码状态， 1：待兑换，2：已兑换，3：兑换活动已结束")
    private Long status;

    /** 兑换人 */
    @Excel(name = "兑换人")
    private Long userId;

    /** 兑换类型，1：优惠券，以后再添加其它类型 */
    @Excel(name = "兑换类型，1：优惠券，以后再添加其它类型")
    private Long type;

    /** 兑换码目标id，例如兑换优惠券，该id则是优惠券的配置id */
    @Excel(name = "兑换码目标id，例如兑换优惠券，该id则是优惠券的配置id")
    private Long exchangeTargetId;

    /** 兑换码过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "兑换码过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiredTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }
    public void setExchangeTargetId(Long exchangeTargetId) 
    {
        this.exchangeTargetId = exchangeTargetId;
    }

    public Long getExchangeTargetId() 
    {
        return exchangeTargetId;
    }
    public void setExpiredTime(Date expiredTime) 
    {
        this.expiredTime = expiredTime;
    }

    public Date getExpiredTime() 
    {
        return expiredTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("status", getStatus())
            .append("userId", getUserId())
            .append("type", getType())
            .append("exchangeTargetId", getExchangeTargetId())
            .append("createTime", getCreateTime())
            .append("expiredTime", getExpiredTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
